<template>
  <view class="">
    <view :key="keyvalue" v-if="token">
      <uni-card>
        <image slot='cover' style="width: 100%;height: 125px;display:block;" :src="cover"></image>
        <text class="uni-body">由于后台接口未开发完毕,此页面只展示部分精选作品!</text>
      </uni-card>
      <my-DetailedArticle></my-DetailedArticle>
    </view>
    <my-resources v-else></my-resources>
  </view>
</template>

<script>
  import timer from '@/mixins/token-timer.js'
  export default {
    mixins: [timer],
    data(){
      return{ 
        cover: 'https://pic.imgdb.cn/item/63f33eb6f144a0100789d01c.jpg',
        wh: '',
        routename: "/pages/home/home",
        // down_url: '',
        // obj_token: {
        //   grant_type: 'client_credential',
        //   appid: 'wxa45927c0f5170f51',
        //   secret: '5fbf9dd67c22b1ee946eb909a6808b3e'
        // },
        // objdata: {
        //   type: 'video',
        //   offset: 0,
        //   count: 20
        // }
        }
      },
    onLoad() {
      const sysinfo = uni.getSystemInfoSync()
      this.wh = sysinfo.windowHeight
      // this.lycklist()
    },
    methods: {
      // lycklist() {
      //   uni.request({
      //     url: 'https://api.weixin.qq.com/cgi-bin/token?grant_type=' + this.obj_token.grant_type + '&appid=' + this
      //       .obj_token.appid + '&secret=' + this.obj_token.secret,
      //     method: 'GET',
      //     success: (res) => {
      //       this.access_token = res.data.access_token
      //       uni.request({
      //         url: 'https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=' + res.data
      //           .access_token,
      //         method: 'POST',
      //         data: this.objdata,
      //         success: (res) => {
      //           this.lyckvideolist = [...this.lyckvideolist, ...res.data.item],
      //             this.objdata.offset = this.objdata.offset + 20
      //         }
      //       })
      //     }
      //   })
      // },
     }
  }
</script>

